<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<jsp:include page="/product/include/base_product_pre_part.jsp"></jsp:include>
<script type="text/javascript">
<!--
function deleteProduct(id,name){
	if(id!="" && name!=""&& window.confirm("确定要删除商品/服务\""+name+"\"?")){
		document.location="<%=request.getContextPath()%>/product/removeProduct.do?id="+id;
	}
}
//-->
</script>
<div class="box_blue">
	<div class="box_title">
		<div class="more">
			<a href="<%=request.getContextPath()%>/category/selectProductCate.do"> <s:text name="product.create.new" /> </a>
		</div>
		商品/服务列表
	</div>
	<s:if test="products==null || products.size==0">
		<s:text name="product.no.record"></s:text>
	</s:if>
	<s:else>
		<ol>
			<s:iterator value="products">
				<li>
					<a href="<%=request.getContextPath()%>/product/viewProduct.do?id=<s:property value="id"/>"> <s:property value="name" /> </a>
					<s:if test="product.raw">
						<a href="#" onclick="javascript:deleteProduct('<s:property value="id"/>','<s:property value="name"/>');"> X </a>
					</s:if>
					<a href="<%=request.getContextPath()%>/order/preAddOrder.do?id=<s:property value="id"/>"> 创建订单 </a>
				</li>
			</s:iterator>
		</ol>
	</s:else>
</div>
<jsp:include page="/product/include/base_product_last_part.jsp"></jsp:include>